home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / ELISP.16 < prev    next >
Text File  |  1994-09-21  |  52KB  |  1,235 lines

  1. Info file elisp, produced by Makeinfo, -*- Text -*- from input file
  2. elisp.texi.
  3.  
  4.    This file documents GNU Emacs Lisp.
  5.  
  6.    This is edition 1.03 of the GNU Emacs Lisp Reference Manual,   for
  7. Emacs Version 18.
  8.  
  9.    Published by the Free Software Foundation, 675 Massachusetts
  10. Avenue,  Cambridge, MA 02139 USA
  11.  
  12.    Copyright (C) 1990 Free Software Foundation, Inc.
  13.  
  14.    Permission is granted to make and distribute verbatim copies of
  15. this manual provided the copyright notice and this permission notice
  16. are preserved on all copies.
  17.  
  18.    Permission is granted to copy and distribute modified versions of
  19. this manual under the conditions for verbatim copying, provided that
  20. the entire resulting derived work is distributed under the terms of a
  21. permission notice identical to this one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that this permission notice may be stated in a
  26. translation approved by the Foundation.
  27.  
  28.  
  29. 
  30. File: elisp,  Node: Splitting Windows,  Next: Deleting Windows,  Prev: Basic Windows,  Up: Windows
  31.  
  32. Splitting Windows
  33. =================
  34.  
  35.    The functions described here are the primitives used to split a
  36. window into two windows.  Two higher level functions sometimes split
  37. a window, but not always: `pop-to-buffer' and `display-buffer' (*note
  38. Displaying Buffers::.).
  39.  
  40.    The functions described here do not accept a buffer as an argument.
  41. They let the two "halves" of the split window display the same buffer
  42. previously visible in the window that was split.
  43.  
  44.  * Function: one-window-p &optional NO-MINI
  45.      This function returns non-`nil' if there is only one window. 
  46.      The argument NO-MINI, if non-`nil', means don't count the
  47.      minibuffer even if it is active; otherwise, the minibuffer
  48.      window is included, if active, in the total number of windows
  49.      which is compared against one.
  50.  
  51.  * Command: split-window &optional WINDOW SIZE HORIZONTAL
  52.      This function splits WINDOW into two windows.  The original
  53.      window WINDOW remains the selected window, but occupies only
  54.      part of its former screen area.  The rest is occupied by a newly
  55.      created window which is returned as the value of this function.
  56.  
  57.      If HORIZONTAL is non-`nil', then WINDOW splits side by side,
  58.      keeping the leftmost SIZE columns and giving the rest of the
  59.      columns to the new window.  Otherwise, it splits into halves one
  60.      above the other, keeping the upper SIZE lines and giving the
  61.      rest of the lines to the new window.  The original window is
  62.      therefore the right-hand or upper of the two, and the new window
  63.      is the left-hand or lower.
  64.  
  65.      If WINDOW is omitted or `nil', then the selected window is
  66.      split.  If SIZE is omitted or `nil', then WINDOW is divided
  67.      evenly into two parts.  (If there is an odd line, it is
  68.      allocated to the new window.)  When `split-window' is called
  69.      interactively, all its arguments are `nil'.
  70.  
  71.      The following example starts with one window on a screen that is
  72.      50 lines high by 80 columns wide; then the window is split.
  73.  
  74.           (setq w (selected-window))
  75.                => #<window 8 on windows.texi>
  76.           (window-edges)                  ; Edges in order: left--top--right--bottom
  77.                => (0 0 80 50)
  78.           
  79.           (setq w2 (split-window w 15))   ; Returns window created
  80.                => #<window 28 on windows.texi>
  81.           (window-edges w2)
  82.                => (0 15 80 50)            ; Bottom window; top is line 15
  83.           (window-edges w)
  84.                => (0 0 80 15)             ; Top window
  85.  
  86.      The screen looks like this:
  87.  
  88.                    __________ 
  89.                   |          |  line 0  
  90.                   |    w     |
  91.                   |__________|
  92.                   |          |  line 15
  93.                   |    w2    |
  94.                   |__________|
  95.                                 line 50
  96.            column 0   column 80
  97.  
  98.      Next, the top window is split horizontally:
  99.  
  100.           (setq w3 (split-window w 35 t))
  101.                => #<window 32 on windows.texi>
  102.           (window-edges w3)
  103.                => (35 0 80 15)  ; Left edge at column 35
  104.           (window-edges w)
  105.                => (0 0 35 15)   ; Right edge at column 35
  106.           (window-edges w2)
  107.                => (0 15 80 50)  ; Bottom window unchanged
  108.  
  109.      Now, the screen looks like this:
  110.  
  111.                column 35
  112.                    __________ 
  113.                   |   |      |  line 0  
  114.                   | w |  w3  |
  115.                   |___|______|
  116.                   |          |  line 15
  117.                   |    w2    |
  118.                   |__________|
  119.                                 line 50
  120.            column 0   column 80
  121.  
  122.  * Command: split-window-vertically SIZE
  123.      This function splits the selected window into two windows, one
  124.      above the other, leaving the selected window with SIZE lines.
  125.  
  126.      This function is simply an interface to `split-windows'.  Here
  127.      is the complete function definition for it:
  128.  
  129.           (defun split-window-vertically (&optional arg)
  130.             "Split selected window into two windows, one above the other..."
  131.             (interactive "P")
  132.             (split-window nil (and arg (prefix-numeric-value arg))))
  133.  
  134.  * Command: split-window-horizontally SIZE
  135.      This function splits the selected window into two windows
  136.      side-by-side, leaving the selected window with SIZE columns.
  137.  
  138.      This function is simply an interface to `split-windows'.  Here
  139.      is the complete definition for `split-window-horizontally'
  140.      (except for part of the documentation string):
  141.  
  142.           (defun split-window-horizontally (&optional arg)
  143.             "Split selected window into two windows side by side..."
  144.             (interactive "P")
  145.             (split-window nil (and arg (prefix-numeric-value arg)) t))
  146.  
  147.  
  148. 
  149. File: elisp,  Node: Deleting Windows,  Next: Selecting Windows,  Prev: Splitting Windows,  Up: Windows
  150.  
  151. Deleting Windows
  152. ================
  153.  
  154.    A "deleted window" no longer appears on the screen.  In Emacs
  155. version 18, the space it took up on the screen is divided
  156. proportionally among all siblings; in version 19, the space is given
  157. to one adjacent sibling.
  158.  
  159.  * Command: delete-window &optional WINDOW
  160.      This function removes WINDOW from the display.  If WINDOW is
  161.      omitted, then the selected window is deleted.  An error is
  162.      signaled if there is only one window when `delete-window' is
  163.      called.
  164.  
  165.           *Warning:* erroneous information or fatal errors may result
  166.           from using a deleted window.  Use `(window-point WINDOW)'
  167.           to test whether a window has been deleted; it yields `nil'
  168.           for a deleted window.
  169.  
  170.      This function returns `nil'.
  171.  
  172.      When `delete-window' is called interactively, WINDOW defaults to
  173.      the selected window.
  174.  
  175.  * Command: delete-other-windows &optional WINDOW
  176.      This function makes WINDOW the only window on the screen by
  177.      deleting all the other windows.  If WINDOW is omitted or `nil',
  178.      then the selected window is used by default.
  179.  
  180.      The result is `nil'.
  181.  
  182.  * Command: delete-windows-on BUFFER
  183.      This function deletes all windows showing BUFFER.  If there are
  184.      no windows showing BUFFER, then this function does nothing.  If
  185.      all windows are showing BUFFER (including the case where there
  186.      is only one window), then the screen reverts to having a single
  187.      window showing the buffer chosen by `other-buffer'.  *Note The
  188.      Buffer List::.
  189.  
  190.      If there are several windows showing different buffers, then
  191.      those showing BUFFER are removed, and the others are expanded to
  192.      fill the void.
  193.  
  194.      The result is `nil'.
  195.  
  196.  
  197. 
  198. File: elisp,  Node: Selecting Windows,  Next: Cyclic Window Ordering,  Prev: Deleting Windows,  Up: Windows
  199.  
  200. Selecting Windows
  201. =================
  202.  
  203.    When a window is selected, the buffer in the window becomes the
  204. current buffer, and the cursor will appear in it.
  205.  
  206.  * Function: selected-window
  207.      This function returns the selected window.  This is the window
  208.      in which the cursor appears and to which many commands apply.
  209.  
  210.  * Function: select-window WINDOW
  211.      This function makes WINDOW the selected window.  The cursor then
  212.      appears in WINDOW (on redisplay).  The buffer being displayed in
  213.      WINDOW is immediately designated the current buffer.
  214.  
  215.      The return value is WINDOW.
  216.  
  217.           (setq w (next-window))
  218.           (select-window w)
  219.                => #<window 65 on windows.texi>
  220.  
  221.    The following functions choose one of the windows on the screen,
  222. offering various criteria for the choice.
  223.  
  224.  * Function: get-lru-window
  225.      This function returns the window least recently "used" (that is,
  226.      selected).  The selected window is always the most recently used
  227.      window.
  228.  
  229.      The selected window can be the least recently used window if it
  230.      is the only window.  A newly created window becomes the least
  231.      recently used window until it is selected.  The minibuffer
  232.      window is not considered a candidate.
  233.  
  234.  * Function: get-largest-window
  235.      This function returns the window with the largest area (height
  236.      times width).  If there are no side-by-side windows, then this
  237.      is the window with the most lines.  The minibuffer window is not
  238.      considered a candidate.
  239.  
  240.      If there are two windows of the same size, then the function
  241.      returns the window which is first in the cyclic ordering of
  242.      windows (see following section), starting from the selected
  243.      window.
  244.  
  245.  
  246. 
  247. File: elisp,  Node: Cyclic Window Ordering,  Next: Buffers and Windows,  Prev: Selecting Windows,  Up: Windows
  248.  
  249. Cycling Ordering of Windows
  250. ===========================
  251.  
  252.    When you use the command `C-x o' (`other-window') to select the
  253. next window, it moves through all the windows on the screen in a
  254. specific cyclic order.  For any given configuration of windows, this
  255. order never varies.  It is called the "cyclic ordering of windows".
  256.  
  257.    This ordering generally goes from top to bottom, and from left to
  258. right.  But it may go down first or go right first, depending on the
  259. order in which the screen, or the windows within the screen, were
  260. split.
  261.  
  262.    If the screen was first split vertically (into windows one above
  263. each other), and then the subwindows were split horizontally, then
  264. the ordering is left to right in the top, and then left to right in
  265. the next lower part of the screen, and so on.  If the screen was
  266. first split horizontally, the ordering is top to bottom in the left
  267. part, and so on.  In general, within each set of siblings at any
  268. level in the window tree, the order is left to right, or top to bottom.
  269.  
  270.  * Function: next-window WINDOW &optional MINIBUF
  271.      This function returns the window following WINDOW in the cyclic
  272.      ordering of windows.  This is the window which `C-x o' would
  273.      select if done when WINDOW is selected.  If WINDOW is the only
  274.      window visible, then this function returns WINDOW.
  275.  
  276.      The value of the argument MINIBUF determines whether the
  277.      minibuffer is included in the window order.  Normally, when
  278.      MINIBUF is `nil', the minibuffer is included if it is currently
  279.      active; this is the behavior of `C-x o'.
  280.  
  281.      If MINIBUF is `t', then the cyclic ordering includes the
  282.      minibuffer window even if it is not active.  If MINIBUF is
  283.      neither `t' nor `nil', then the minibuffer window is not
  284.      included even if it is active.  (The minibuffer window is active
  285.      while the minibuffer is in use.  *Note Minibuffers::.)
  286.  
  287.      This example shows two windows, which both happen to be
  288.      displaying the same buffer:
  289.  
  290.           (selected-window)
  291.                => #<window 56 on windows.texi>
  292.           (next-window (selected-window))
  293.                => #<window 52 on windows.texi>
  294.           (next-window (next-window (selected-window)))
  295.                => #<window 56 on windows.texi>
  296.  
  297.  * Function: previous-window WINDOW
  298.      This function returns the window preceding WINDOW in the cyclic
  299.      ordering of windows.
  300.  
  301.  * Command: other-window COUNT
  302.      This function selects the COUNTth next window in the cyclic
  303.      order.  If count is negative, then it selects the -COUNTth
  304.      preceding window.  It returns `nil'.
  305.  
  306.      In an interactive call, COUNT is the numeric prefix argument.
  307.  
  308.  
  309. 
  310. File: elisp,  Node: Buffers and Windows,  Next: Displaying Buffers,  Prev: Cyclic Window Ordering,  Up: Windows
  311.  
  312. Buffers and Windows
  313. ===================
  314.  
  315.    This section describes low-level functions to examine windows or
  316. to show buffers in windows in a precisely controlled fashion.
  317.  
  318.    *Note Displaying Buffers::, for
  319.  
  320.    related functions that find a window to use and specify a buffer
  321. for it.  The functions described there are easier to use than these,
  322. but they employ heuristics in choosing or creating a window; use
  323. these functions when you need complete control.
  324.  
  325.  * Function: set-window-buffer WINDOW BUFFER-OR-NAME
  326.      This function makes WINDOW display BUFFER-OR-NAME as its
  327.      contents.  It returns `nil'.
  328.  
  329.           (set-window-buffer (selected-window) "foo")
  330.                => nil
  331.  
  332.  * Function: window-buffer &optional WINDOW
  333.      This function returns the buffer that WINDOW is displaying.  If
  334.      WINDOW is omitted, then this function returns the buffer for the
  335.      selected window.
  336.  
  337.           (window-buffer)
  338.                => #<buffer windows.texi>
  339.  
  340.  * Function: get-buffer-window BUFFER-OR-NAME
  341.      This function returns a window currently displaying
  342.      BUFFER-OR-NAME, or `nil' if there is none.  If there are several
  343.      such windows, then the function returns the first one in the
  344.      cyclic ordering of windows, starting from the selected window. 
  345.      *Note Cyclic Window Ordering::.
  346.  
  347.  * Command: replace-buffer-in-windows BUFFER
  348.      This function replaces BUFFER with some other buffer in all
  349.      windows displaying it.  The other buffer used is chosen with
  350.      `other-buffer'.  In the usual applications of this function, you
  351.      don't care which other buffer is used; you just want to make
  352.      sure that BUFFER is off the screen.
  353.  
  354.      This function returns `nil'.
  355.  
  356.  
  357. 
  358. File: elisp,  Node: Displaying Buffers,  Next: Window Point,  Prev: Buffers and Windows,  Up: Windows
  359.  
  360. Displaying Buffers in Windows
  361. =============================
  362.  
  363.    In this section we describe convenient functions that choose a
  364. window automatically and use it to display a specified buffer.  These
  365. functions can also split an existing window in certain circumstances.
  366. We also describe variables that parameterize the heuristics used for
  367. choosing a window.
  368.  
  369.    *Note Buffers and Windows::, for
  370.  
  371.    low-level functions that give you more precise control.
  372.  
  373.    Do not use the functions in this section in order to make a buffer
  374. current so that a Lisp program can access or modify it; they are too
  375. drastic for that purpose, since they change the display of buffers on
  376. the screen, which is gratuitous and will surprise the user.  Instead,
  377. use `set-buffer' (*note Current Buffer::.) and `save-excursion'
  378. (*note Excursions::.), which designate buffers as current for
  379. programmed access without affecting the display of buffers in windows.
  380.  
  381.  * Command: switch-to-buffer BUFFER-OR-NAME &optional NORECORD
  382.      This function makes BUFFER-OR-NAME the current buffer, and also
  383.      displays the buffer in the selected window.  This means that a
  384.      human can see the buffer and subsequent keyboard commands will
  385.      apply to it.  Contrast this with `set-buffer', which makes
  386.      BUFFER-OR-NAME the current buffer but does not display it in the
  387.      selected window.  *Note Current Buffer::.
  388.  
  389.      If BUFFER-OR-NAME does not identify an existing buffer, then a
  390.      new buffer by that name is created.
  391.  
  392.      Normally the specified buffer is put at the front of the buffer
  393.      list.  This affects the operation of `other-buffer'.  However,
  394.      if NORECORD is non-`nil', this is not done.  *Note The Buffer
  395.      List::.
  396.  
  397.      The `switch-to-buffer' function is often used interactively, as
  398.      the binding of `C-x b'.  It is also used frequently in programs.
  399.      It always returns `nil'.
  400.  
  401.  * Command: switch-to-buffer-other-window BUFFER-OR-NAME
  402.      This function makes BUFFER-OR-NAME the current buffer and
  403.      displays it in a window not currently selected.  It then selects
  404.      that window.  The handling of the buffer is the same as in
  405.      `switch-to-buffer'.
  406.  
  407.      The previously selected window is absolutely never used to
  408.      display the buffer.  If it is the only window, then it is split
  409.      to make a distinct window for this purpose.  If the selected
  410.      window is already displaying the buffer, then it continues to do
  411.      so, but another window is nonetheless found to display it in as
  412.      well.
  413.  
  414.  * Function: pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW
  415.      This function makes BUFFER-OR-NAME the current buffer and
  416.      switches to it in some window, preferably not the window
  417.      previously selected.  The "popped-to" window becomes the
  418.      selected window.
  419.  
  420.      If the variable `pop-up-windows' is non-`nil', windows may be
  421.      split to create a new window that is different from the original
  422.      window.
  423.  
  424.      If OTHER-WINDOW is non-`nil', `pop-to-buffer' finds or creates
  425.      another window even if BUFFER-OR-NAME is already visible in the
  426.      selected window.  Thus BUFFER-OR-NAME could end up displayed in
  427.      two windows.  On the other hand, if BUFFER-OR-NAME is already
  428.      displayed in the selected window and OTHER-WINDOW is `nil', then
  429.      the selected window is considered sufficient display for
  430.      BUFFER-OR-NAME, so that nothing needs to be done.
  431.  
  432.      If BUFFER-OR-NAME is a string that does not name an existing
  433.      buffer, a buffer by that name is created.
  434.  
  435.      An example use of this function is found at the end of *Note
  436.      Filter Functions::.
  437.  
  438.  * Function: display-buffer BUFFER-OR-NAME &optional NOT-THIS-WINDOW
  439.      This function makes BUFFER-OR-NAME appear in some window, like
  440.      `pop-to-buffer', but it does not select that window and does not
  441.      make the buffer current.  The identity of the selected window is
  442.      unaltered by this function.
  443.  
  444.      If NOT-THIS-WINDOW is non-`nil', it means that the specified
  445.      buffer should be displayed in a window other than the selected
  446.      one, even if it is already on display in the selected window. 
  447.      This can cause the buffer to appear in two windows at once. 
  448.      Otherwise, if BUFFER-OR-NAME is already being displayed in any
  449.      window, that is good enough, so this function does nothing.
  450.  
  451.      If the variable `pop-up-windows' is non-`nil', windows can be
  452.      split to display the buffer.  If there are multiple windows,
  453.      `display-buffer' will split the largest window if it has more
  454.      than the number of lines specified by the variable
  455.      `split-height-threshold'.
  456.  
  457.      `display-buffer' returns the window chosen to display
  458.      BUFFER-OR-NAME.
  459.  
  460.  * User Option: pop-up-windows
  461.      This variable controls whether `display-buffer' makes new
  462.      windows.  If it is non-`nil' and there is only one window on the
  463.      screen, then that window is split.  If it is `nil', then
  464.      `display-buffer' does not split the single window, but rather
  465.      replaces its buffer.
  466.  
  467.      This variable also affects `pop-to-buffer', which uses
  468.      `display-buffer' as a subroutine.
  469.  
  470.  * User Option: split-height-threshold
  471.      This variable determines when `display-buffer' may split a
  472.      window, if there are multiple windows.  `display-buffer' splits
  473.      the largest window if it has at least this many lines.
  474.  
  475.      If there is only one window, it is split regardless of this
  476.      value, provided `pop-up-windows' is non-`nil'.
  477.  
  478.  
  479. 
  480. File: elisp,  Node: Window Point,  Next: Window Start,  Prev: Displaying Buffers,  Up: Windows
  481.  
  482. Window Point
  483. ============
  484.  
  485.    Each window has its own value of point, independent of the value
  486. of point in other windows displaying the same buffer.  This makes it
  487. useful to have multiple windows showing one buffer.
  488.  
  489.    * The window point is established when a window is first created;
  490.      it is initialized from the buffer's point, or from the window
  491.      point of another window opened on the buffer if such a window
  492.      exists.
  493.  
  494.    * Selecting a window sets the value of point in its buffer to the
  495.      window's value of point.  Conversely, deselecting a window
  496.      copies the buffer's value of point into the window.  Thus, when
  497.      you switch between windows that display a given buffer, the
  498.      point value for the selected window is in effect in the buffer,
  499.      while the point values for the other windows are stored in those
  500.      windows.
  501.  
  502.    * As long as the selected window displays the current buffer, the
  503.      window's point and the buffer's point always move together; they
  504.      remain equal.
  505.  
  506.    * *Note Positions::, for more details on positions.
  507.  
  508.    As far as the user is concerned, point is where the cursor is, and
  509. when the user switches to another buffer, the cursor jumps to the
  510. position of point in that buffer.
  511.  
  512.  * Function: window-point WINDOW
  513.      This function returns the current position of point in WINDOW. 
  514.      For a nonselected window, this is the value point would have (in
  515.      that window's buffer) if that window were selected.
  516.  
  517.      When WINDOW is the selected window and its buffer is also the
  518.      current buffer, the value returned is the same as point in that
  519.      buffer.
  520.  
  521.      Strictly speaking, it would be more correct to return the
  522.      "top-level" value of point, outside of any `save-excursion'
  523.      forms.  But that value is hard to find.
  524.  
  525.  * Function: set-window-point WINDOW POSITION
  526.      This function positions point in WINDOW at position POSITION in
  527.      WINDOW's buffer.
  528.  
  529.  
  530. 
  531. File: elisp,  Node: Window Start,  Next: Vertical Scrolling,  Prev: Window Point,  Up: Windows
  532.  
  533. The Display-Start Position
  534. ==========================
  535.  
  536.    Each window contains a marker used to keep track of a buffer
  537. position which specifies where in the buffer display should start. 
  538. This position is called the "display-start" position of the window. 
  539. The character after this position is the one that appears at the
  540. upper left corner of the window.  It is usually, but not inevitably,
  541. at the beginning of a text line.
  542.  
  543.  * Function: window-start &optional WINDOW
  544.      This function returns the display-start position of window
  545.      WINDOW.  If WINDOW is `nil', the selected window is used.
  546.  
  547.           (window-start)
  548.                => 7058
  549.  
  550.      For a more complicated example of use, see the description of
  551.      `count-lines' in *Note Text Lines::.
  552.  
  553.  * Function: set-window-start WINDOW POSITION &optional NOFORCE
  554.      This function sets the display-start position of WINDOW to
  555.      POSITION in WINDOW's buffer.
  556.  
  557.      The display routines insist that the position of point be
  558.      visible when a buffer is displayed.  Normally, they change the
  559.      display-start position (that is, scroll the window) whenever
  560.      necessary to make point visible.  However, if you specify the
  561.      start position with this function with `nil' for NOFORCE, it
  562.      means you want display to start at POSITION even if that would
  563.      put the location of point off the screen.  What the display
  564.      routines do in this case is move point instead, to the left
  565.      margin on the middle line in the window.
  566.  
  567.      For example, if point is 1 and you attempt to set the start of
  568.      the window to 2, then the position of point would be "above" the
  569.      top of the window.  The display routines would automatically
  570.      move point if it is still 1 when redisplay occurs.  Here is an
  571.      example:
  572.  
  573.           ;; Here is what `foo' looks like before executing
  574.           ;; the `set-window-start' expression.
  575.  
  576.              ---------- Buffer: foo ----------
  577.           -!-This is the contents of buffer foo.
  578.           2
  579.           3
  580.           4
  581.           5
  582.           6
  583.           ---------- Buffer: foo ----------
  584.  
  585.  
  586.                     (set-window-start (selected-window) (1+ (window-start)))
  587.           
  588.           ;; Here is what `foo' looks like after executing
  589.           ;; the `set-window-start' expression.
  590.  
  591.              ---------- Buffer: foo ----------
  592.           his is the contents of buffer foo.
  593.           2
  594.           3
  595.           -!-4
  596.           5
  597.           6
  598.           ---------- Buffer: foo ----------
  599.           
  600.                => 2
  601.  
  602.      However, when NOFORCE is non-`nil', `set-window-start' does
  603.      nothing if the specified start position would make point
  604.      invisible.
  605.  
  606.      This function returns POSITION, regardless of whether the
  607.      NOFORCE option caused that position to be overruled.
  608.  
  609.  * Function: pos-visible-in-window-p &optional POSITION WINDOW
  610.      This function returns `t' if POSITION is within the range of
  611.      text currently visible on the screen in WINDOW.  It returns
  612.      `nil' if POSITION is scrolled vertically out of view.  The
  613.      argument POSITION defaults to the current position of point;
  614.      WINDOW, to the selected window.  Here is an example:
  615.  
  616.           (or (pos-visible-in-window-p (point) (selected-window))
  617.               (recenter 0))
  618.  
  619.      The `pos-visible-in-window-p' function considers only vertical
  620.      scrolling.  It returns `t' if POSITION is out of view only
  621.      because WINDOW has been scrolled horizontally.  *Note Horizontal
  622.      Scrolling::.
  623.  
  624.  
  625. 
  626. File: elisp,  Node: Vertical Scrolling,  Next: Horizontal Scrolling,  Prev: Window Start,  Up: Windows
  627.  
  628. Vertical Scrolling
  629. ==================
  630.  
  631.    Vertical scrolling means moving the text up or down in a window. 
  632. It works by changing the value of the window's display-start
  633. location.  It may also change the value of `window-point' to keep it
  634. on the screen.
  635.  
  636.    In the commands `scroll-up' and `scroll-down', the directions "up"
  637. and "down" refer to the motion of the text in the buffer at which you
  638. are looking through the window.  Imagine that the text is written on
  639. a long roll of paper and that the scrolling commands move the paper
  640. up and down.  Thus, if you are looking at text in the middle of a
  641. buffer and repeatedly call `scroll-down', you will eventually see the
  642. beginning of the buffer.
  643.  
  644.    Some people have urged that the opposite convention be used: they
  645. imagine that the window moves over text that remains in place.  Then
  646. "down" commands would take you to the end of the buffer.  This view
  647. is more consistent with the actual relationship between windows and
  648. the text in the buffer, but it is less like what the user sees.  The
  649. position of a window on the terminal does not move, and short
  650. scrolling commands clearly move the text up or down on the screen. 
  651. We have chosen names that fit the user's point of view.
  652.  
  653.    The scrolling functions (aside from `scroll-other-window') will
  654. have unpredictable results if the current buffer is different from
  655. the buffer that is displayed in the selected window.  *Note Current
  656. Buffer::.
  657.  
  658.  * Command: scroll-up &optional COUNT
  659.      This function scrolls the text in the selected window upward
  660.      COUNT lines.  If COUNT is negative, scrolling is actually
  661.      downward.
  662.  
  663.      If COUNT is `nil' (or omitted), then the length of the scroll is
  664.      `next-screen-context-lines' lines less than the usable height of
  665.      the window (not counting its mode line).
  666.  
  667.      `scroll-up' returns `nil'.
  668.  
  669.  * Command: scroll-down &optional COUNT
  670.      This function scrolls the text in the selected window downward
  671.      COUNT lines.  If COUNT is negative, scrolling is actually upward.
  672.  
  673.      If COUNT is omitted or `nil', then the length of the scroll is
  674.      `next-screen-context-lines' lines less than the usable height of
  675.      the window.
  676.  
  677.      `scroll-down' returns `nil'.
  678.  
  679.  * Command: scroll-other-window &optional COUNT
  680.      This function scrolls the text in another window upward COUNT
  681.      lines.  Negative values of COUNT, or `nil', are handled as in
  682.      `scroll-up'.
  683.  
  684.      The window that is scrolled is normally the one following the
  685.      selected window in the cyclic ordering of windows--the window
  686.      that `next-window' would return.  *Note Cyclic Window Ordering::.
  687.  
  688.      If the selected window is the minibuffer, the next window is
  689.      normally the one at the top left corner.  However, you can
  690.      specify the window to scroll by binding the variable
  691.      `minibuffer-scroll-window'.  This variable has no effect when
  692.      any other window is selected.  *Note Minibuffer Misc::.
  693.  
  694.      When the minibuffer is active, it is the next window if the
  695.      selected window is the one at the bottom right corner.  In this
  696.      case, `scroll-other-window' will attempt to scroll the
  697.      minibuffer.  If the minibuffer contains just one line, that line
  698.      will be redisplayed after the echo area momentarily displays the
  699.      message "Beginning of buffer".
  700.  
  701.  * User Option: scroll-step
  702.      This variable controls how scrolling is done automatically when
  703.      point moves off the screen.  If the value is zero, then the text
  704.      is scrolled so that point is centered vertically in the window. 
  705.      If the value is a positive integer N, then if it is possible to
  706.      bring point back on screen by scrolling N lines in either
  707.      direction, that is done; otherwise, point is centered vertically
  708.      as usual.  The default value is zero.
  709.  
  710.  * User Option: next-screen-context-lines
  711.      The value of this variable is the number of lines of continuity
  712.      to retain when scrolling by full screens.  For example, when
  713.      `scroll-up' executes, this many lines that were visible at the
  714.      bottom of the window move to the top of the window.  The default
  715.      value is `2'.
  716.  
  717.  * Command: recenter &optional COUNT
  718.      This function scrolls the selected window to put the text where
  719.      point is located at a specified screen position.
  720.  
  721.      If COUNT is a nonnegative number, it puts the line containing
  722.      point COUNT lines down from the top of the window.  If COUNT is
  723.      a negative number, then it counts upward from the bottom of the
  724.      window, so that -1 stands for the last usable line in the window.
  725.      If COUNT is a non-`nil' list, then it stands for the line in the
  726.      middle of the window.
  727.  
  728.      If COUNT is `nil', then it puts the line containing point in the
  729.      middle of the window, then clears and redisplays the entire
  730.      screen.
  731.  
  732.      When `recenter' is called interactively, Emacs sets COUNT to the
  733.      raw prefix argument.  Thus, typing `C-u' as the prefix sets the
  734.      COUNT to a non-`nil' list, while typing `C-u 4' sets COUNT to 4,
  735.      which positions the current line four lines from the top.
  736.  
  737.      Typing `C-u 0 C-l' positions the current line at the top of the
  738.      window.  This action is so handy that some people bind the
  739.      command to a function key.  For example,
  740.  
  741.           (defun line-to-top-of-window ()
  742.             "Scroll the selected window up so current line moves to the top.
  743.           Replaces three keystroke sequence C-u 0 C-l."
  744.             (interactive) 
  745.             (recenter 0))
  746.           
  747.           (global-set-key "\C-cl" 'line-to-top-of-window)
  748.  
  749.  
  750. 
  751. File: elisp,  Node: Horizontal Scrolling,  Next: Size of Window,  Prev: Vertical Scrolling,  Up: Windows
  752.  
  753. Horizontal Scrolling
  754. ====================
  755.  
  756.    Because we read English first from top to bottom and second from
  757. left to right, horizontal scrolling is not like vertical scrolling. 
  758. Vertical scrolling involves selection of a contiguous portion of text
  759. to display.  Horizontal scrolling causes part of each line to go off
  760. screen.  The amount of horizontal scrolling is therefore specified as
  761. a number of columns rather than as a position in the buffer.  It has
  762. nothing to do with the display-start position returned by
  763. `window-start'.
  764.  
  765.    Usually, no horizontal scrolling is in effect; then the leftmost
  766. column is at the left edge of the window.  In this state, scrolling
  767. to the right is meaningless, since there is no data to the left of
  768. the screen to be revealed by it, so it is not allowed.  Scrolling to
  769. the left is allowed; it causes the first columns of text to go off
  770. the edge of the window and can reveal additional columns on the right
  771. that were truncated before.  Once a window has a nonzero amount of
  772. leftward horizontal scrolling, you can scroll it back to the right,
  773. but only so far as to reduce the net horizontal scroll to zero. 
  774. There is no limit to how far left you can scroll, but eventually all
  775. the text will disappear off the left edge.
  776.  
  777.  * Command: scroll-left COUNT
  778.      This function scrolls the selected window COUNT columns to the
  779.      left (or to the right if COUNT is negative).  The return value
  780.      is the total amount of leftward horizontal scrolling in effect
  781.      after the change--just like the value returned by
  782.      `window-hscroll'.
  783.  
  784.  * Command: scroll-right COUNT
  785.      This function scrolls the selected window COUNT columns to the
  786.      right  (or to the left if COUNT is negative).  The return value
  787.      is the total amount of leftward horizontal scrolling in effect
  788.      after the change--just like the value returned by
  789.      `window-hscroll'.
  790.  
  791.      Once you scroll a window as far right as it can go, back to its
  792.      normal position where the total leftward scrolling is zero,
  793.      attempts to scroll any farther have no effect.
  794.  
  795.  * Function: window-hscroll &optional WINDOW
  796.      This function returns the total leftward horizontal scrolling of
  797.      WINDOW--the number of columns by which the text in WINDOW is
  798.      scrolled left past the left margin.
  799.  
  800.      The value is never negative.  It is zero when no horizontal
  801.      scrolling has been done in WINDOW (which is usually the case).
  802.  
  803.      If WINDOW is `nil', the selected window is used.
  804.  
  805.           (window-hscroll)
  806.                => 0
  807.           (scroll-left 5)
  808.                => 5
  809.           (window-hscroll)
  810.                => 5
  811.  
  812.  * Function: set-window-hscroll WINDOW COLUMNS
  813.      This function sets the number of columns from the left margin
  814.      that WINDOW is scrolled to the value of COLUMNS.  The argument
  815.      COLUMNS should be zero or positive; if not, it is taken as zero.
  816.  
  817.      The value returned is COLUMNS.
  818.  
  819.           (set-window-hscroll (selected-window) 10)
  820.                => 10
  821.  
  822.    Here is how you can determine whether a given position POSITION is
  823. off the screen due to horizontal scrolling:
  824.  
  825.      (save-excursion 
  826.        (goto-char POSITION)
  827.        (and 
  828.         (>= (- (current-column) (window-hscroll WINDOW)) 0)
  829.         (< (- (current-column) (window-hscroll WINDOW))
  830.            (window-width WINDOW))))
  831.  
  832.  
  833. 
  834. File: elisp,  Node: Size of Window,  Next: Resizing Windows,  Prev: Horizontal Scrolling,  Up: Windows
  835.  
  836. The Size of a Window
  837. ====================
  838.  
  839.    An Emacs window is rectangular, and its size information consists
  840. of the height (the number of lines) and the width (the number of
  841. character positions in each line).  The mode line is included in the
  842. height.  For a window that does not abut the right hand edge of the
  843. screen, the column of `|' characters that separates it from the
  844. window on the right is included in the width.
  845.  
  846.    The following three functions return size information about a
  847. window:
  848.  
  849.  * Function: window-height &optional WINDOW
  850.      This function returns the number of lines in WINDOW, including
  851.      its mode line.  If WINDOW fills the entire screen, this is one
  852.      less than the value of `(screen-height)' (since the last line is
  853.      always reserved for the minibuffer).
  854.  
  855.      If WINDOW is `nil', the function uses the selected window.
  856.  
  857.           (window-height)
  858.                => 23
  859.           (split-window-vertically)
  860.                => #<window 4 on windows.texi>
  861.           (window-height)
  862.                => 11
  863.  
  864.  * Function: window-width &optional WINDOW
  865.      This function returns the number of columns in WINDOW.  If
  866.      WINDOW fills the entire screen, this is the same as the value of
  867.      `(screen-width)'.
  868.  
  869.      If WINDOW is `nil', the function uses the selected window.
  870.  
  871.           (window-width)
  872.                => 80
  873.  
  874.  * Function: window-edges &optional WINDOW
  875.      This function returns a list of the edge coordinates of WINDOW. 
  876.      If WINDOW is `nil', the selected window is used.
  877.  
  878.      The order of the list is `(LEFT TOP RIGHT BOTTOM)', all elements
  879.      relative to 0, 0 at the top left corner of the screen.  The
  880.      element RIGHT of the value is one more than the rightmost column
  881.      used by WINDOW, and BOTTOM is one more than the bottommost row
  882.      used by WINDOW and its mode-line.
  883.  
  884.      Here is the result obtained on a typical 24-line terminal with
  885.      just one window:
  886.  
  887.           (window-edges (selected-window))
  888.                => (0 0 80 23)
  889.  
  890.      If WINDOW is at the upper left corner of the screen, RIGHT and
  891.      BOTTOM are the same as the values returned by `(window-width)'
  892.      and `(window-height)' respectively, and TOP and BOTTOM are zero.
  893.      For example, the edges of the following window are `0 0 5 8'. 
  894.      Assuming that the screen has more than 8 columns, the last
  895.      column of the window (column 7) holds a border rather than text.
  896.      The last row (row 4) holds the mode line, shown here with
  897.      `xxxxxxxxx'.
  898.  
  899.                      0    
  900.                      _______
  901.                   0 |       | 
  902.                     |       |   
  903.                     |       | 
  904.                     |       | 
  905.                     xxxxxxxxx  4
  906.           
  907.                             7
  908.  
  909.      When there are side-by-side windows, any window not at the right
  910.      edge of the screen has a border in its last column.  This border
  911.      counts as one column in the width of the window.  A window never
  912.      includes a border on its left, since the border there belongs to
  913.      the window to the left.
  914.  
  915.      In the following example, let's imagine that the screen is 7
  916.      columns wide.  Then the edges of the left window are `0 0 4 3'
  917.      and the edges of the right window are `4 0 7 3'.
  918.  
  919.                      ___ ___
  920.                     |   |   |    
  921.                     |   |   |    
  922.                     xxxxxxxxx 
  923.           
  924.                      0  34  7
  925.  
  926.  
  927. 
  928. File: elisp,  Node: Resizing Windows,  Next: Window Configurations,  Prev: Size of Window,  Up: Windows
  929.  
  930. Changing the Size of a Window
  931. =============================
  932.  
  933.    The window size functions fall into two classes: high-level
  934. commands that change the size of windows and low-level functions that
  935. access window size.  Emacs does not permit overlapping windows or
  936. gaps between windows, so resizing one window affects other windows.
  937.  
  938.  * Command: enlarge-window SIZE &optional HORIZONTAL
  939.      This function makes the selected window SIZE lines bigger,
  940.      stealing lines from neighboring windows.  It generally tries to
  941.      steal equal numbers of lines from the other windows.  If a
  942.      window from which lines are stolen shrinks below
  943.      `window-min-height', then that window disappears.
  944.  
  945.      If HORIZONTAL is non-`nil', then this function makes WINDOW
  946.      wider by SIZE columns, stealing columns as it does lines.  If a
  947.      window from which lines are stolen shrinks below
  948.      `window-min-width', then that window disappears.
  949.  
  950.      If the screen is smaller than SIZE lines (or columns), then the
  951.      function makes the window occupy the entire height (or width) of
  952.      the screen.
  953.  
  954.      If SIZE is negative, this function shrinks the window by -SIZE
  955.      lines.  If it becomes shorter than `window-min-height', it
  956.      disappears.
  957.  
  958.      `enlarge-window' returns `nil'.
  959.  
  960.  * Command: enlarge-window-horizontally COLUMNS
  961.      This function makes the selected window COLUMNS wider.  It could
  962.      be defined as follows:
  963.  
  964.           (defun enlarge-window-horizontally (columns)
  965.             (enlarge-window columns t))
  966.  
  967.  * Command: shrink-window SIZE &optional HORIZONTAL
  968.      This function is like `enlarge-window' but negates the argument
  969.      SIZE, making the selected window smaller by giving lines (or
  970.      columns) to the other windows.  If the window shrinks below
  971.      `window-min-height' or `window-min-width', then it disappears.
  972.  
  973.      If SIZE is negative, the window is enlarged by -SIZE lines.
  974.  
  975.  * Command: shrink-window-horizontally COLUMNS
  976.      This function makes the selected window COLUMNS narrower.  It
  977.      could be defined as follows:
  978.  
  979.           (defun shrink-window-horizontally (columns)
  980.             (shrink-window columns t))
  981.  
  982.    The following two variables constrain the window size changing
  983. functions to a minimum height and width.
  984.  
  985.  * User Option: window-min-height
  986.      The value of this variable determines how short a window may
  987.      become before it disappears.  A window disappears when it
  988.      becomes smaller than `window-min-height', and no window may be
  989.      created that is smaller.  The absolute minimum height is two
  990.      (allowing one line for the mode line, and one line for the
  991.      buffer display).  Actions which change window sizes reset this
  992.      variable to two if it is less than two.  The default value is 4.
  993.  
  994.  * User Option: window-min-width
  995.      The value of this variable determines how narrow a window may
  996.      become before it disappears.  A window disappears when it
  997.      becomes narrower than `window-min-width', and no window may be
  998.      created that is narrower.  The absolute minimum width is one;
  999.      any value below that is ignored.  The default value is 10.
  1000.  
  1001.  
  1002. 
  1003. File: elisp,  Node: Window Configurations,  Prev: Resizing Windows,  Up: Windows
  1004.  
  1005. Window Configurations
  1006. =====================
  1007.  
  1008.    "Window configurations" record entire screen layouts--all windows,
  1009. their sizes, which buffers they contain, what part of each buffer is
  1010. displayed, and the values of point and the mark.  You can bring back
  1011. an entire previous screen layout by restoring a window configuration
  1012. that you had previously saved.
  1013.  
  1014.  * Function: current-window-configuration
  1015.      This function returns a new object representing Emacs's current
  1016.      window configuration, namely the number of windows, their sizes
  1017.      and current buffers, which window is the selected window, and
  1018.      for each window the displayed buffer, the display-start
  1019.      position, and the positions of point and the mark.  An exception
  1020.      is made for point in the current buffer, whose value is not saved.
  1021.  
  1022.  * Function: set-window-configuration CONFIGURATION
  1023.      This function restores the configuration of Emacs's windows and
  1024.      buffers to the state specified by CONFIGURATION.  The argument
  1025.      CONFIGURATION must be a value that was previously returned by
  1026.      `current-window-configuration'.
  1027.  
  1028.      Here is a way of using this function to get the same effect as
  1029.      `save-window-excursion':
  1030.  
  1031.           (let ((config (current-window-configuration)))
  1032.             (unwind-protect
  1033.                 (progn (split-window-vertically nil)
  1034.                        ...)
  1035.               (set-window-configuration config)))
  1036.  
  1037.  * Special Form: save-window-excursion FORMS...
  1038.      This special form executes FORMS in sequence, preserving window
  1039.      sizes and contents, including the value of point and the portion
  1040.      of the buffer which is visible.  However, it does not restore
  1041.      the value of point in the current buffer; use `save-excursion'
  1042.      for that.
  1043.  
  1044.      The return value is the value of the final form in FORMS.  For
  1045.      example:
  1046.  
  1047.           (split-window)
  1048.                => #<window 25 on control.texi>
  1049.           (setq w (selected-window))
  1050.                => #<window 19 on control.texi>
  1051.           (save-window-excursion
  1052.             (delete-other-windows w)
  1053.             (switch-to-buffer "foo")
  1054.             'do-something)
  1055.                => do-something
  1056.             ;; The screen is now split again.
  1057.  
  1058.     Primitives to look inside of window configurations would make
  1059. sense, but none are implemented.  It is not clear they are useful
  1060. enough to be worth implementing.
  1061.  
  1062.  
  1063. 
  1064. File: elisp,  Node: Positions,  Next: Markers,  Prev: Windows,  Up: Top
  1065.  
  1066. Positions
  1067. *********
  1068.  
  1069.    A "position" is the index of a character in the text of buffer. 
  1070. More precisely, a position identifies the place between two
  1071. characters (or before the first character, or after the last
  1072. character), so we can speak of the character before or after a given
  1073. position.  However, the character after a position is often said to
  1074. be "at" that position.
  1075.  
  1076.    Positions are usually represented as integers starting from 1, but
  1077. can also be represented as "markers"--special objects which relocate
  1078. automatically when text is inserted or deleted so they stay with the
  1079. surrounding characters.  *Note Markers::.
  1080.  
  1081. * Menu:
  1082.  
  1083. * Point::         The special position where editing takes place.
  1084. * Motion::        Changing point.
  1085. * Excursions::    Temporary motion and buffer changes.
  1086. * Narrowing::     Restricting editing to a portion of the buffer.
  1087.  
  1088.  
  1089. 
  1090. File: elisp,  Node: Point,  Next: Motion,  Prev: Positions,  Up: Positions
  1091.  
  1092. Point
  1093. =====
  1094.  
  1095.    "Point" is a special buffer position used by many editing
  1096. commands, including the self-inserting typed characters and text
  1097. insertion functions.  Other commands move point through the text to
  1098. allow editing and insertion at different places.
  1099.  
  1100.    Like other positions, point designates a place between two
  1101. characters (or before the first character, or after the last
  1102. character), rather than a particular character.  Many terminals
  1103. display the cursor over the character that immediately follows point;
  1104. on such terminals, point is actually before the character on which
  1105. the cursor sits.
  1106.  
  1107.    The value of point is a number between 1 and the buffer size plus 1.
  1108. If narrowing is in effect (*note Narrowing::.), then point is
  1109. constrained to fall within the accessible portion of the buffer
  1110. (possibly at one end of it).
  1111.  
  1112.    Each buffer has its own value of point, which is independent of
  1113. the value of point in other buffers.  Each window also has a value of
  1114. point, which is independent of the value of point in other windows on
  1115. the same buffer.  This is why point can have different values in
  1116. various windows that display the same buffer.  When a buffer appears
  1117. in only one window, the buffer's point and the window's point
  1118. normally have the same value, so the distinction is rarely important.
  1119. *Note Window Point::, for more details.
  1120.  
  1121.  * Function: point
  1122.      This function returns the position of point in the current
  1123.      buffer, as an integer.
  1124.  
  1125.           (point)
  1126.                => 175
  1127.  
  1128.  * Function: point-min
  1129.      This function returns the minimum accessible value of point in
  1130.      the current buffer.  This is 1, unless narrowing is in effect,
  1131.      in which case it is the position of the start of the region that
  1132.      you narrowed to.  (*Note Narrowing::.)
  1133.  
  1134.  * Function: point-max
  1135.      This function returns the maximum accessible value of point in
  1136.      the current buffer.  This is `(1+ (buffer-size))', unless
  1137.      narrowing is in effect, in which case it is the position of the
  1138.      end of the region that you narrowed to.  (*Note Narrowing::).
  1139.  
  1140.  * Function: buffer-end FLAG
  1141.      This function returns `(point-min)' if FLAG is less than 1,
  1142.      `(point-max)' otherwise.  The argument FLAG must be a number.
  1143.  
  1144.  * Function: buffer-size
  1145.      This function returns the total number of characters in the
  1146.      current buffer.  In the absence of any narrowing (*note
  1147.      Narrowing::.), `point-max' returns a value one larger than this.
  1148.  
  1149.           (buffer-size)
  1150.                => 35
  1151.           (point-max)
  1152.                => 36
  1153.  
  1154.  * Variable: buffer-saved-size
  1155.      The value of this buffer-local variable is the former length of
  1156.      the current buffer, as of the last time it was read in, saved or
  1157.      auto-saved.
  1158.  
  1159.  
  1160. 
  1161. File: elisp,  Node: Motion,  Next: Excursions,  Prev: Point,  Up: Positions
  1162.  
  1163. Motion
  1164. ======
  1165.  
  1166.    Motion functions change the value of point, either relative to the
  1167. current value of point, relative to the beginning or end of the
  1168. buffer, or relative to the edges of the selected window.
  1169.  
  1170. * Menu:
  1171.  
  1172. * Character Motion::       Moving in terms of characters.
  1173. * Word Motion::            Moving in terms of words.
  1174. * Buffer End Motion::      Moving to the beginning or end of the buffer.
  1175. * Text Lines::             Moving in terms of lines of text.
  1176. * Screen Lines::           Moving in terms of lines as displayed.
  1177. * Vertical Motion::        Implementation of `next-line' and 
  1178.                              `previous-line'.
  1179. * List Motion::            Moving by parsing lists and sexps.
  1180. * Skipping Characters::    Skipping characters belonging to a certain set.
  1181.  
  1182.  
  1183. 
  1184. File: elisp,  Node: Character Motion,  Next: Word Motion,  Prev: Motion,  Up: Motion
  1185.  
  1186. Motion by Characters
  1187. --------------------
  1188.  
  1189.    These functions move point based on a count of characters. 
  1190. `goto-char' is a fundamental primitive because it is the way to move
  1191. point to a specified position.
  1192.  
  1193.  * Command: goto-char POSITION
  1194.      This function sets point in the current buffer to the value
  1195.      POSITION.  If POSITION is less than 1, then point is set to the
  1196.      beginning of the buffer.  If it is greater than the length of
  1197.      the buffer, then point is set to the end of the buffer.
  1198.  
  1199.      If narrowing is in effect, then the position is still measured
  1200.      from the beginning of the buffer, but point cannot be moved
  1201.      outside of the accessible portion.  Therefore, if POSITION is
  1202.      too small, point is set to the beginning of the accessible
  1203.      portion of the text; if POSITION is too large, point is set to
  1204.      the end.
  1205.  
  1206.      When this function is called interactively, POSITION is the
  1207.      numeric prefix argument, if provided; otherwise it is read from
  1208.      the minibuffer.
  1209.  
  1210.      `goto-char' returns POSITION.
  1211.  
  1212.  * Command: forward-char &optional COUNT
  1213.      This function moves point forward, towards the end of the
  1214.      buffer, COUNT characters (or backward, towards the beginning of
  1215.      the buffer, if COUNT is negative).  If the function attempts to
  1216.      move point past the beginning or end of the buffer (or the
  1217.      limits of the accessible portion, when narrowing is in effect),
  1218.      an error is signaled with error code `beginning-of-buffer' or
  1219.      `end-of-buffer'.
  1220.  
  1221.      In an interactive call, COUNT is the numeric prefix argument.
  1222.  
  1223.  * Command: backward-char &optional COUNT
  1224.      This function moves point backward, towards the beginning of the
  1225.      buffer, COUNT characters (or forward, towards the end of the
  1226.      buffer, if COUNT is negative).  If the function attempts to move
  1227.      point past the beginning or end of the buffer (or the limits of
  1228.      the accessible portion, when narrowing is in effect), an error
  1229.      is signaled with error code `beginning-of-buffer' or
  1230.      `end-of-buffer'.
  1231.  
  1232.      In an interactive call, COUNT is the numeric prefix argument.
  1233.  
  1234.  
  1235.